﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace StoragePeriod.Web.Services
{
    /// <summary>
    /// AjaxServiceLocator 的摘要说明
    /// </summary>
    public class AjaxServiceLocator : AjaxServicesBase
    {
        public override void ProcessRequest(HttpContext context)
        {
            base.ProcessRequest(context);

            string ActionType = context.Request["ActionType"];
            AjaxResult result = null;

            switch (ActionType.ToLower())
            {
                case "report":
                    result = new ReportServices().Excute(context);
                    break;
                case "common":
                    result = new CommonServices().Excute(context);
                    break;
            }

            base.SendAjaxResult(context, result);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}